import { terser } from 'rollup-plugin-terser'
import commonjs from 'rollup-plugin-commonjs'
import babel from 'rollup-plugin-babel';

export default {
    input: 'src/index.js',
    output: [
        {
            file: 'dist/bundle.esm.js',
            format: 'esm',
        },
        {
            file: 'dist/bundle.cjs.js',
            format: 'cjs',
        },
    ],
    plugins: [
        commonjs(),
        terser(),
        babel({
            babelrc: false,
            "presets": [
                [
                "es2015",
                {
                    "modules": false
                }
                ]
            ],
            "plugins": [
                "external-helpers"
            ]
        })
        // babel({ babelHelpers: 'bundled' }),
    ]
}